/*
  *
  * @ProjectName:    my_umi_app
  * @Package:
  * @ClassName:      test_model
  * @Description:    测试Model
  * @Author:         SuPeiSen
  * @CreateDate:     2020/12/21 4:38 下午
  * @UpdateDate:     2020/12/21 4:38 下午
  * @UpdateRemark:   更新说明：
  * @Version:        1.0
 */

// React.Component
//
// interface Actions {
//   [key: string]: void
// }
//
// class TestModel<S, Actions> {
//
//   public state: S
//   public actions: Actions
//
//   constructor(initialState: S, actions: Actions) {
//     this.state = initialState
//     this.actions = actions
//     Object.keys(actions).forEach((name)=>{
//       // this.actions[name] = (...args:any)=> {
//       //
//       // }
//     })
//   }
//
//
// }

import { observable, computed } from "mobx";

class OrderLine {
  @observable price = 0;
  @observable amount = 1;

  @computed get total() {
    return this.price * this.amount;
  }
}
